﻿<%@ Page Language="C#" %>

<%
  
    int maHinhTrangTri = BUS.HinhTrangTriBus.LayIDTheoHinh(int.Parse(Request["hinh"]));
    int maNguoiDung = int.Parse(Request["nguoidung"]);
    int maHinhMau = BUS.HinhMauThietKeBus.LayIDTheoHinh(Request["kieu"] + Request["mau"]);

    
    
    DTO.SanPhamThietKeDto sanpham = new DTO.SanPhamThietKeDto();
    sanpham.IDHinhMau = maHinhMau;
    sanpham.IDHinhTrangTri = maHinhTrangTri;
    sanpham.IDNguoiDung = maNguoiDung;
    sanpham.ThoiDiem = DateTime.Parse("01/01/1900");
    if (BUS.SanPhamThietKeBus.ThemSanPhamThietKe(sanpham) == true)
        Response.Write("1");
    else
        Response.Write("0");
%>
